namespace EyeSoft.Wpf.Facilities.Demo.ViewModels
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Windows.Input;

	using EyeSoft.ComponentModel;
	using EyeSoft.Wpf.Facilities;

	public class ShellViewModel : AutoRegisterViewModel, IDisposable
	{
		public ShellViewModel()
		{
			MenuItemCollection =
				new[]
					{
						new MenuItem("Customer 3232"),
						new MenuItem("Fiscal code")
					};

			var viewModel = new MainViewModel();
			DialogService.Navigate(viewModel);
		}

		~ShellViewModel()
		{
			Dispose();
		}

		public ICommand ChangeViewCommand { get; private set; }

		public IEnumerable<MenuItem> MenuItemCollection { get; private set; }

		public void Dispose()
		{
		}

		protected void AsyncChangeView(string viewName)
		{
			DialogService.Navigate<FiscalCodeViewModel>();

			DialogService.Navigate(new FiscalCodeViewModel("Bkdjsfksdl"));
		}

		protected bool AsyncCanShowChild()
		{
			return true;
		}
	}

	public class FiscalCodeViewModel : ViewModel, INavigableViewModel
	{
		public FiscalCodeViewModel(string bkdjsfksdl)
		{
			throw new NotImplementedException();
		}

		public void Closing(ClosingArg arg)
		{
			throw new NotImplementedException();
		}
	}
}